package com.jk.app.controller;

import com.alibaba.fastjson.JSONObject;
import com.jk.app.bean.OrderForm;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class GetRabbitMQController {

      @RabbitListener(queues = "1807B-hly")
      public void  getOrderForm(String  orderJson){
          System.out.println(orderJson);

          OrderForm orderForm = JSONObject.parseObject(orderJson, OrderForm.class);
          System.out.println(orderForm);

      }

}
